<{include file="../common/header.tpl"}>
    <table width="100%" border="0" cellspacing="0">
     <tr>
           <td width="13%" valign="top">
               <{include file="../common/left.tpl"}>
           </td>
           <td width="87%" valign="top">

            <table width="100%" border="0" cellspacing="0">
              <tr>
                    <td>
                        <div class="subnav">
                            <div class="content-menu ib-a blue line-x"> 
                                <a href="/webadmin/user/list"><em>管理员管理</em></a><span>|</span><a class="on" href="javascript:;"><em><{$op_name}></em></a> 
                            </div>			
                        </div>
                            <div class="pad_10">
                              <div class="common-form">
                                    <form autocomplete="off" name="myform" action="<{if $info.user_id}>/webadmin/user/doedit<{else}>/webadmin/user/doadd<{/if}>" method="post" id="myform">
                                    <table width="100%" class="table_form">
                                    <tbody>
                                    <tr>
                                    <td>真实姓名</td>
                                    <td>
                                    <input type="text" name="truename" class="input-text" id="realname" value="<{$info.truename}>">
                                    </td>
                                    </tr>
                                    <tr>
                                    <td width="80">登陆账号</td> 
                                    <td><input type="test" name="username" class="input-text" id="username" value="<{$info.username}>"></td>
                                    </tr>
                                    <tr>
                                    <td>密码</td> 
                                    <td><input type="password" name="pwd" class="input-text" id="password" value="<{$info.pwd}>"></td>
                                    </tr>
                                    <tr>
                                    <td>确认密码</td> 
                                    <td><input type="password" name="pwd1" class="input-text" id="pwdconfirm" value="<{$info.pwd}>"></td>
                                    </tr>
                                    <tr>
                                    <td>组(操作权限)</td>
                                    <td>
                                    <{foreach $allgroup as $key => $val}>
                                        <input type="radio" name="group_id" value="<{$val.group_id}>" <{if $info.group_id==$val.group_id}>checked="checked"<{/if}>><{$val.group_name}>
                                    <{/foreach}>
                                    </select
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>项目权限</td>
                                    <td>
                                        <input type="checkbox" name="project_id" <{if $project_id==-2}>checked="checked"<{/if}> id="project_id" value="-1">所有<span style="color:red;">(指定项目权限请到<b><a href="/webadmin/project/list">项目页</a></b>选择本用户)</span>
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>E-mail</td>
                                    <td>
                                    <input type="text" name="email" class="input-text" id="email" size="30" value="<{$info.email}>">
                                    </td>
                                    </tr>
                                    <tr>
                                    <td>联系方式</td>
                                    <td>
                                    <input type="text" name="phone" class="input-text" id="phone" size="30" value="<{$info.phone}>">
                                    </td>
                                    </tr>
                                    </tbody></table>
                                    <div class="bk15"></div>
                                    <input type="hidden" name="user_id" value="<{$info.user_id}>"/>
                                            <input name="dosubmit" type="submit" value="提交" class="button">
                                    </form>
                                    </div>
                            </div>

                    </td>
              </tr>
            </table>

        </td>
  </tr>
  </table>
<script>
    $(function(){
        $('#myform').submit(function(){
            var realname = $('#realname').val();
            if (realname == '') {
                alert('真是姓名不能为空');return false;
            }
            var username = $('#username').val();
            if (username == '') {
                alert('登陆账号不能为空');return false;
            }
            var password = $('#password').val();
            if (password == '') {
                alert('密码不能为空');return false;
            }
            var pwdconfirm = $('#pwdconfirm').val();
            if (pwdconfirm == '') {
                alert('确认密码不能为空');return false;
            }
            if (pwdconfirm != password) {
                alert('两次密码输入不一致');return false;
            }
            return true;
        });
    })
</script>
<{include file="../common/footer.tpl"}>